//
//  needfile.h
//  MyShiDiQuan
//
//  Created by cvicseks-mac1 on 16/8/5.
//  Copyright © 2016年 cvicseks-mac1. All rights reserved.
//

#ifndef needfile_h
#define needfile_h

#define JudyLog( s, ... ) NSLog(@"%s(%d)> %@", __func__, __LINE__, [NSString stringWithFormat:(s), ##__VA_ARGS__] )


#pragma mark - 字体

#define Font(x) [UIFont systemFontOfSize:x]

#pragma mark - 颜色
/**
 *  通过传入RGB值来获取颜色，透明度为1，==UIColor colorWithRGB
 *  @param r red
 *  @param g green
 *  @param b blue
 *  @return UIColor
 */
#define RGBCOLOR(r, g, b)       [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:1]
/**
 *  通过传入RGBA值来获取颜色，需要传入透明度，==UIColor colorWithRGB
 *  @param r red
 *  @param g green
 *  @param b blue
 *  @param a 透明度
 *  @return UIColor
 */
#define RGBACOLOR(r, g, b, a) [UIColor colorWithRed:(r)/255.0f green:(g)/255.0f blue:(b)/255.0f alpha:(a)]
/**
 *  通过16进制转换成UIColor
 *  @param rgbValue 0x36c7b7（其实就是#36c7b7）
 *  @return UIColor
 */
#define UIColorFromRGB(rgbValue) [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0f green:((float)((rgbValue & 0xFF00) >> 8))/255.0f blue:((float)(rgbValue & 0xFF))/255.0f alpha:1.0f]
//MARK: 全局颜色、色调
#define SYSCOLOR UIColorFromRGB(0x36c7b7)
#define BGCOLOR UIColorFromRGB(0xf0efed)
#define SEPERATORCOLOR UIColorFromRGB(0xd6d5d4)
#define WHITECOLOR      [UIColor whiteColor]
#define ClearCOLOR      [UIColor clearColor]
#define LightGrayCOLOR  [UIColor lightGrayColor]
#define DarkGrayCOLOR   [UIColor darkGrayColor]

// 导航栏y值
#define kMaxY CGRectGetMaxY(self.navigationController.navigationBar.frame)
//应用尺寸
#define kWIDTH [[UIScreen mainScreen]applicationFrame].size.width
#define kHEIGHT [[UIScreen mainScreen]applicationFrame].size.height

#endif /* needfile_h */
